package com.study.teacher;

public class Calculator {
	private int result=0;
	
	public void calc(char operator,int operand){
		switch(operator){
		case '+':result+=operand;break;
		case '-':result-=operand;break;
		case '*':result*=operand;break;
		case '/':result/=operand;break;
		}
	}
	
	public int getResult(){
		return this.result;
	}
}
